class Solution {
public:
    vector<int> constructRectangle(int area)
    {
        int L = sqrt(area);
        if (L * L == area) 
        {
            return vector<int>{L, L};
        }

        int W = 1;
        for (int i = 1; i <= L; i++)
        {
            if (area % i == 0)
            {
                W = i;
            }
        }
        return vector<int>{area / W, W};
    }
};
